﻿/**
 * 
 * @file OperatorsSave.h
 * @brief 保存文件操作器
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-10-31
 * 
 */
#ifndef _OperatorsSave_H
#define _OperatorsSave_H

#include "FITK_Kernel/FITKCore/FITKActionOperator.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"

namespace ModelOper
{
    /**
     * @brief 保存工程文件操作器
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-10-31
     */
    class OperatorsSave :public Core::FITKActionOperator
    {
        Q_OBJECT
    public:
        /**
         * @brief Construct a new Operators Save object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-31
         */
        explicit OperatorsSave();
        /**
         * @brief Destroy the Operators Save object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-31
         */
        virtual ~OperatorsSave();
        /**
         * @brief 执行界面操作
         * @return true  执行成功
         * @return false  执行失败
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-31
         */
        virtual bool execGUI() override;
        /**
         * @brief 执行写出操作
         * @return true  执行成功
         * @return false  执行失败
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-31
         */
        virtual bool execProfession() override;

    private slots:
        /**
         * @brief 读取线程结束执行该槽函数
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-03-26
         */
        void ioThreadFinishedSlot();
    };

    // 按钮注册相关操作
    Register2FITKOperatorRepo(actionSave, OperatorsSave);
}

#endif